<template>

  <div>
    <h1>和：{{ sum }}</h1>
    <button @click="sum++">点击+1</button>

    <h3>坐标：x:{{point.x}},y:{{point.y}}</h3>
  </div>

</template>

<script>

import {
  ref,
  reactive,
  watch,
  watchEffect,
  onBeforeMount,
  onMounted,
  onBeforeUpdate,
  onUpdated,
  onBeforeUnmount,
  onUnmounted
} from 'vue'

import usePoint from "../hooks/usePoint";

export default {
  name: "demo05",
  setup() {
    console.log('-----setup--------')
    let sum = ref(0)

    let point = usePoint();


    return {
      sum,point
    }
  },
}
</script>

<style scoped>

</style>